import request from '@/utils/request'

// 查询听证告知书列表
export function listHearingNotice(query) {
  return request({
    url: '/ruoyi-system/hearingnoticeapprovalresult/list',
    method: 'get',
    params: query,
  })
}

// 查询听证告知书审批详细
export function getHearingNotice(id) {
  return request({
    url: '/ruoyi-system/hearingnoticeapprovalresult/' + id,
    method: 'get',
  })
}

// 新增听证告知书审批
export function addHearingNotice(data) {
  return request({
    url: '/ruoyi-system/hearingnoticeapprovalresult',
    method: 'post',
    data: data,
  })
}

// 修改听证告知书审批
export function updateHearingNotice(data) {
  return request({
    url: '/ruoyi-system/hearingnoticeapprovalresult',
    method: 'put',
    data: data,
  })
}

// 删除听证告知书审批
export function delHearingNotice(id) {
  return request({
    url: '/ruoyi-system/hearingnoticeapprovalresult/' + id,
    method: 'delete',
  })
}

// 预览

export function previewHearingNotice(params) {
  return request({
    url: '/ruoyi-system/hearingnoticeapprovalresult/preview',
    method: 'get',
    params,
  })
}

// 详情页预览
export function previewPdf(data) {
  return request({
    url: '/ruoyi-system/hearingnoticeapprovalresult/pdfPreview',
    method: 'post',
    data,
  })
}
// 保存附件
export function addHearingFiles(data) {
  return request({
    url: '/ruoyi-system/hearingnoticeapprovalresult/addFiles',
    method: 'post',
    data,
  })
}

// 导出
export function exportHearingNotice(data) {
  return request({
    url: '/ruoyi-system/hearingnoticeapprovalresult/export',
    method: 'post',
    data,
    responseType: 'blob',
  })
}

// 导出送达回证
export function receipEexportHearingNotice(data) {
  return request({
    url: '/ruoyi-system/hearingnoticeapprovalresult/receipEexport',
    method: 'post',
    data,
    responseType: 'blob',
  })
}

// 立案号下拉
export function getCaseList() {
  return request({
    url: '/ruoyi-system/hearingnoticeapprovalresult/caseList',
    method: 'get',
  })
}

export function getContent(id) {
  return request({
    url: '/ruoyi-system/hearingnoticeapprovalresult/getContent?caseId=' + id,
    method: 'get',
  })
}
